package com.chhuang.ewcrm.thread;

import com.chhuang.ewcrm.App;
import com.chhuang.ewcrm.dao.WLogDao;
import com.chhuang.ewcrm.entity.WLog;

import java.util.Date;

/**
 * @author chhuang
 * @create 2020-11-27-9:27
 */
public class AddLogThread implements Runnable{

    private WLog log;

    private final WLogDao wLogDao = App.getSession().getMapper(WLogDao.class);

    /**
     * userId, username, fullname, logContent
     * @param strings
     */
    public AddLogThread(String... strings){
        log = new WLog(null, strings[0], strings[1], strings[2], strings[3], new Date(),null,null);
    }

    @Override
    public void run() {
        wLogDao.insert(log);
    }
}
